// Register.cpp : implementation file
//

#include "stdafx.h"
#include "moretunes.h"
#include "Register.h"
#include ".\register.h"
#include "misc.h"

// CRegister dialog

IMPLEMENT_DYNAMIC(CRegister, CDialog)
CRegister::CRegister(CPrefTab *prefs, CWnd* pParent /*=NULL*/)
	: CDialog(CRegister::IDD, pParent)
	, _prefs(prefs)
{
}

CRegister::~CRegister()
{
}

void CRegister::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_EDIT3, _name);
	DDX_Control(pDX, IDC_EDIT2, _email);
	DDX_Control(pDX, IDC_EDIT1, _key);
}


BEGIN_MESSAGE_MAP(CRegister, CDialog)
	ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedRegister)
	ON_BN_CLICKED(IDC_BUTTON2, OnBnClickedBuy)
END_MESSAGE_MAP()


// CRegister message handlers
#define MESSAGE_REGISTER_OK "Thank you for registering. \n\
Exit and reopen moreTunes to complete registration." 
#define MESSAGE_REGISTER_BAD "One or more fields are incorrect" 

void CRegister::OnBnClickedRegister()
{
}

void CRegister::OnBnClickedBuy() {
	ShellExecute(NULL, "open", URL_BUY_MORETUNES, NULL, NULL, SW_SHOWNORMAL);	
}
